import { rcaNumberFormat0 } from './common.js'
import { dateFormat } from '@/util/date'
import { commonTableOption } from './common.js'
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const tableOption = {
  ...commonTableOption,
  height: '400px',
  column: [
    {
      hide: true,
      search: true,
      type: 'date',
      label: '日期范围',
      prop: 'tradeDate',
      searchSpan: 12,
      searchRange: true,
      searchValue: [],
      format: 'yyyy-MM-dd',                  // 这是组件展示的日期格式
      valueFormat: 'yyyy-MM-dd',
    },
    {
      search: false,
      type: 'select',
      label: '运营商',
      width:'150px',
      props: {
        label: 'operatorsName',
        value: 'operators'
      },
      dicUrl: '/rca/swckclearrules/listoperators',
      prop: 'operators'
    },
    {
      search: false,
      type: 'input',
      label: '线路',
      width:'150px',
      prop: 'lineName'
     /*
	  dicQuery: { allLine: true },
      dicUrl: '/support/swparamline/dictsecondname',
      props: {
        label: 'name',
        value: 'code'
      },*/
    },
    {
      label: '待清分金额',
      children: [
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '单程票',
          prop: 'paidinOnewaySum'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '日票',
          prop: 'waitDaily'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '纪念票',
          prop: 'commemorativeTicket'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '二维码',
          prop: 'waitQrCode'
        },
         {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '人脸',
          prop: 'faceTicketCcb'
        },
      ]
    },
    {
      label: '清分结果金额',
      children: [
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '单程票',
          prop: 'receivableOnewayReceivedClean'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '日票',
          prop: 'resultDaily'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '纪念票',
          prop: 'receivableCommemorativeTicket'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '二维码',
          prop: 'resultQrCode'
        },
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '人脸',
          prop: 'receivableFaceTicketCcb'
        },
      ]
    },
    {
      label: '划账金额',
      children: [
        {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '单程票',
          prop: 'remitOnewayTicket'
        }, {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '日票',
          prop: 'remitDaily'
        },{
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '纪念票',
          prop: 'remitCommemorativeTicket'
        }, {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '二维码',
          prop: 'remitQrCode'
        },  {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '人脸',
          prop: 'remitFaceTicketCcb'
        }, {
          type: 'input',
          showSummary: true,
          precision: 7,
          width:'150px',
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '小计',
          prop: 'remitSubtotal'
        }
      ]
    },]
}
